﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="print01.aspx.cs" Inherits="webprint_print01" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>打印快递单(外阜)</title>
    <link href="print01.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="../jquery/126/jquery-1.2.6.js"></script>    <script language="javascript" type="text/javascript">
    function LowerToUp(lower)
    {
        var str="";
        for(i=0;i<lower.length;i++)
        {
            switch(lower.substr(i,1))
               {
               case "1":
                 str+="壹";
                 break;
               case "2":
                 str+="贰";
                 break;
               case "3":
                 str+="叁";
                 break;
               case "4":
                 str+="肆";
                 break;
               case "5":
                 str+="伍";
                 break;
               case "6":
                 str+="陆";
                 break;
               case "7":
                 str+="柒";
                 break;
               case "8":
                 str+="捌";
                 break;
               case "9":
                 str+="玖";
                 break;
               case "0":
                 str+="零";
                 break;
               }
        }
        if(str.length-1 >=0)
        document.getElementById ("yuan").innerHTML=str.substr(str.length-1,1);
        else
        document.getElementById("yuan").innerHTML="&nbsp;&nbsp;";
        if(str.length-2 >=0)
        document.getElementById ("shi").innerHTML=str.substr(str.length-2,1);
        else
        document.getElementById("shi").innerHTML="&nbsp;&nbsp;";
        if(str.length-3 >=0)
        document.getElementById ("bai").innerHTML=str.substr(str.length-3,1);
        else
        document.getElementById("bai").innerHTML="&nbsp;&nbsp;";
        if(str.length-4 >=0)
        document.getElementById ("qian").innerHTML=str.substr(str.length-4,1);
        else
        document.getElementById("qian").innerHTML="&nbsp;&nbsp;";
        if(str.length-5 >=0)
        document.getElementById ("wan").innerHTML=str.substr(str.length-5,1);
        else
        document.getElementById("wan").innerHTML="&nbsp;&nbsp;";
    }
    function showdiv(obj)
    {
        if(obj.value=='0')
        {
            document.getElementById('divoutside').style.display="block";
            document.getElementById ('divlocal').style.display="none";
        }
        else
        {
            document.getElementById('divoutside').style.display ="none";
            document.getElementById ('divlocal').style.display="block";
        }
    }
    function showPerPrint()
    {
        document.getElementById('backdiv').style.visibility ='visible';
        document.getElementById('centerdiv').style.visibility='visible';
        if(document.getElementsByName('rdtype')[0].checked)
        {    
            document.getElementById('centerdiv').innerHTML+=document.getElementById('divoutside').innerHTML;
            $(":input",centerdiv).attr("disabled","disabled");
            $(":button",centerdiv).attr("disabled","");
        }
        else
        {
            document.getElementById('centerdiv').innerHTML+=document.getElementById('divlocal').innerHTML;
            $(":input",centerdiv).attr("disabled","disabled");
            $(":button",centerdiv).attr("disabled","");
        }
    }
    function hidediv()
    {
        document.getElementById('backdiv').style.visibility ='hidden';
        document.getElementById('centerdiv').style.visibility='hidden';
        document.getElementById('centerdiv').innerHTML="<input type='button' value='关闭' onclick='hidediv();' />";  
    }
    </script>
</head>
<body>
    <form id="form1" runat="server" style="font-size:9pt;">
    <div>
    <div id='backdiv' class='backdiv'></div>
    <div id='centerdiv' class ='centerdiv'><input type="button" value='关闭' onclick='hidediv();' /> </div>
    <div >
        
        <input id="Radio1" type='radio' runat="server"   name="rdtype" value='0' onclick ="showdiv(this);" checked />外阜快递
        <input id="Radio2" type='radio'  runat="server"  name="rdtype" onclick ="showdiv(this);" value='1' />本市快递
    </div>
    <div id="divoutside" style="">
        <table width="100%" border="1" style="font-size:9pt;border-width:thick">
  <tr bgcolor="#006666">
    <td colspan="4"><strong><font size='2' color="#FFFFFF">FROM(SHIPPER)SENT BY 寄件人名、地址：</font></strong></td>
    <td colspan="2"><strong><font size='2' color="#FFFFFF">TO(CONSIGNEE'S)ATTENTION OF 收件人名、地址：</font></strong></td>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" ><p>公司：COMPANY:<br/>
            
                <asp:TextBox ID="txtFromCompany" CssClass="textinput" runat="server" MaxLength="20" Width="220px"></asp:TextBox>
        </p>
    </td>
    <td colspan="2"><p>公司：COMPANY:<br/>
            
                <asp:TextBox ID="txtToCompany" runat="server" CssClass="textinput" MaxLength="20" Width="220px"></asp:TextBox>&nbsp;</p>
    </td>
    <td colspan="2" rowspan="3" valign="top"><p>备注：REMARK:<br/><asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Height="102px" MaxLength="30" Rows="5" EnableTheming="False"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td colspan="4"><p>地址：ADDRESS:<br/>
            
                <asp:TextBox ID="txtFromAdd" runat="server" CssClass="textinput" MaxLength="15" Rows="2" TextMode="MultiLine" Width="220px"></asp:TextBox>&nbsp;</p>
    </td>
    <td colspan="2"><p>地址：ADDRESS:<br/>
            
                <asp:TextBox ID="txtToAdd" runat="server" CssClass="textinput" MaxLength="15" Rows="2" TextMode="MultiLine" Width="220px"></asp:TextBox>&nbsp;</p>
    </td>
  </tr>
  
  <tr>
    <td colspan="2"><p>联系人:<br/>LINKMAN:<asp:TextBox ID="txtFromLinkMan" runat="server" CssClass="textinput" MaxLength="4"></asp:TextBox>
        </p></td>
    <td colspan="2"><p>电话：<br/>TEL:<asp:TextBox ID="txtFromTel" runat="server" CssClass="textinput" MaxLength="11"></asp:TextBox>
        </p></td>
    <td><p>联系人: <br/>LINKMAN: 
          <asp:TextBox ID="txtToLinkMan" runat="server" CssClass="textinput" MaxLength="4"></asp:TextBox>
        </p></td>
    <td><p>电话：<br/>TEL:<asp:TextBox ID="txtToTel" runat="server" CssClass="textinput" MaxLength="11"></asp:TextBox>
        </p></td>
  </tr>
  <tr>
    <td><p>保价金额：<br/>INSURANCE AMOUNT</p></td>
    <td valign="bottom">
        <asp:TextBox ID="txtInsuranceAmount" runat="server" CssClass="textinput" MaxLength="5" Width="40px"></asp:TextBox>元</td>
    <td><p>保价费：<br/>INSURANCE FEE: </p></td>
    <td valign="bottom">
        <asp:TextBox ID="txtInsuranceFee" runat="server" CssClass="textinput" MaxLength="5" Width="40px"></asp:TextBox>元</td>
    <td>代收货款：</td>
    <td>   &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
        &nbsp;&nbsp;<strong ><span id="wan">&nbsp;&nbsp;</span></strong>万<strong ><span id="qian">&nbsp;&nbsp;</span></strong>仟<strong ><span id="bai">&nbsp;&nbsp;</span></strong>佰<strong ><span id="shi">&nbsp;&nbsp;</span></strong>拾<strong ><span id="yuan">&nbsp;&nbsp;</span></strong>元</td>
    <td colspan="2">货款(小写) &yen;： 
        <input type='text' id="txtGoodPrice" runat="server" class="textinput" onkeyup="LowerToUp(this.value)" maxlength="5"/>元</td>
  </tr>
  <tr>
    <td><p>货品名称：<br/>DESCRPTION ONTENTS</p></td>
    <td><asp:TextBox ID="txtGoodName" runat="server" CssClass="textinput" MaxLength="10" Width="100px"></asp:TextBox></td>
    <td>体积</td>
    <td  valign="bottom">
        <asp:TextBox ID="txtVolume" runat="server" CssClass="textinput" MaxLength="5" Width="40px"></asp:TextBox>M<sup>3</sup></td>
    <td rowspan="3"><p>运费<br/>CHAEFES </p>
        <p>
            &nbsp;</p>
        <p>
            <asp:TextBox ID="txtCharges" runat="server" CssClass="textinput" MaxLength="10" Width="100px"></asp:TextBox>元</p>
    </td>
    <td align="center" bgcolor="#FF9900">付款方式</td>
    <td>回单号</td>
    <td><asp:TextBox ID="txtReturnNo" runat="server" CssClass="textinput" MaxLength="10"></asp:TextBox></td>
  </tr>
  <tr>
    <td rowspan="2"><p>件数<br/>NO.OF PKGS </p></td>
    <td rowspan="2"  valign="bottom">
        <asp:TextBox ID="txtPieces" runat="server" CssClass="textinput" MaxLength="5" Width="40px"></asp:TextBox>件</td>
    <td rowspan="2"><p>重量<br/>WEIGHT</p></td>
    <td rowspan="2"  valign="bottom"><asp:TextBox ID="txtWeight" runat="server" CssClass="textinput" MaxLength="5" Width="40px"></asp:TextBox>Kg</td>
    <td rowspan="2" bgcolor="#FF9900">
        <asp:RadioButtonList ID="rblPayType" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Value="0">月结</asp:ListItem>
            <asp:ListItem Value="1">预付</asp:ListItem>
            <asp:ListItem Value="2">到付</asp:ListItem>
        </asp:RadioButtonList></td>
    <td rowspan="2"><p>多件<br/>起止号</p></td>
    <td><asp:TextBox ID="txtNoStart" runat="server" CssClass="textinput" MaxLength="10"></asp:TextBox></td>
  </tr>
  <tr>
    <td><asp:TextBox ID="txtNoEnd" runat="server" CssClass="textinput" MaxLength="10"></asp:TextBox></td>
  </tr>
  <tr>
    <td colspan="8">日期：
    </td>
  </tr>
</table>
    </div>
    <div id="divlocal" style="display:none">
        <table width="100%" border="1" style="font-size:9pt;border-width:thick">
  <tr>
    <td><p>发件人签名(Sender Name):<br/>
    <asp:TextBox runat="server" ID="txt_Sender" CssClass="textinput" MaxLength='4'></asp:TextBox></p></td>
    <td><p>收件人(Receiver Name):<br/>
    <asp:TextBox runat="server" ID="txt_Receiver" CssClass="textinput" MaxLength='4'></asp:TextBox>
        </p></td>
    <td><p>件数(Pieces):<br/>
    <asp:TextBox runat="server" ID="txt_Pieces" CssClass="textinput" MaxLength='5' Width="50px"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td><p>发件公司(Company Name):<br/>
    <asp:TextBox runat="server" ID="txt_FromCompany" CssClass="textinput" MaxLength='20'></asp:TextBox></p></td>
    <td><p>收件公司(Company Name):<br/>
    <asp:TextBox runat="server" ID="txt_ToCompany" CssClass="textinput" MaxLength='20'></asp:TextBox>
        </p></td>
    <td><p>重量(Weight):<br/>
    <asp:TextBox runat="server" ID="txt_Weight" CssClass="textinput" MaxLength='5' Width="50px"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td rowspan="2" valign="top"><p>发件方地址(Address):<br/>
    <asp:TextBox runat="server" ID="txt_FromAdd" CssClass="textinput" MaxLength='15' Height="60px" TextMode="MultiLine" Width="260px" Rows="2"></asp:TextBox></p></td>
    <td rowspan="2" valign="top"><p>收件方地址(Address):<br/>
    <asp:TextBox runat="server" ID="txt_ToAdd" CssClass="textinput" MaxLength='15' Height="60px" TextMode="MultiLine" Width="260px" Rows="2"></asp:TextBox>
        </p>
    </td>
    <td><p>加急费(Urgent):<br/>
    <asp:TextBox runat="server" ID="txt_Urgent" CssClass="textinput" MaxLength='5' Width="50px"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td><p>保价费:5%(insurance Fee five)<br/>
    <asp:TextBox runat="server" ID="txt_Insurance" CssClass="textinput" MaxLength='5' Width="50px"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td><p>发件方电话(Phone):<br/>
    <asp:TextBox runat="server" ID="txt_FromTel" CssClass="textinput" MaxLength='11'></asp:TextBox></p></td>
    <td><p>收件方电话(Phone):<br/>
    <asp:TextBox runat="server" ID="txt_ToTel" CssClass="textinput" MaxLength='11'></asp:TextBox></p></td>
    <td><p>费用总计(Total):<br/>
    <asp:TextBox runat="server" ID="txt_TotalPrice" CssClass="textinput" MaxLength='8' Width="50px"></asp:TextBox></p></td>
  </tr>
  <tr>
    <td><p>快递内容(Full Description of Contents):<br/>
    <asp:TextBox runat="server" ID="txt_contents" CssClass="textinput" MaxLength='15'></asp:TextBox></p></td>
    <td><p>付款方式:<br/>
        <asp:RadioButtonList ID="rbl_paytype" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Value="0">发件方</asp:ListItem>
            <asp:ListItem Value="1">收件方</asp:ListItem>
            <asp:ListItem Value="2">月结</asp:ListItem>
            <asp:ListItem Value="3">现结</asp:ListItem>
            <asp:ListItem Value="4">返回结</asp:ListItem>
        </asp:RadioButtonList></p></td>
    <td><p>往返:<br/>
        <asp:RadioButtonList ID="rbl_return" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Value="1">是</asp:ListItem>
            <asp:ListItem Value="0">否</asp:ListItem>
        </asp:RadioButtonList></p></td>
  </tr>
  <tr>
    <td>日期:
    </td>
    <td colspan="2">备注:<asp:TextBox ID="txt_Remark" runat="server" CssClass="textinput" Width="300px" MaxLength="30" Rows="2" TextMode="MultiLine"></asp:TextBox></td>
  </tr>
</table>
    </div>
        <asp:Button ID="btPrint" runat="server" Text="打印" OnClick="btPrint_Click" />
        <asp:Button ID="btPrePrint" runat="server" OnClick="btPrePrint_Click" Text="打印预览" />
        <input type="button" value='打印预览' onclick="showPerPrint()" />
        
      </div>
    </form>
</body>
</html>
